<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>登录账号</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<script type="text/javascript" src="./js/jquery-1.12.4.min.js"></script>
<script type="text/javascript" src="./js/jquery.validate.min.js"></script>
</head>

<body class="back">

<div class="reg">
	<h3>登录账号</h3>
    
    <form id="loginForm">
    	<ul class="zc_form">
	    	<li><input type="text" class="reg_txt" value="" id="loginTel" name="loginTel" placeholder="请输入手机号"></li>
	        <li><input type="text" class="reg_txt" value="" id="loginPass" name="loginPass" placeholder="请输入密码"></li>
	        <li><input type="submit" class="reg_sub" value="登录" name=""></li>
	        <li><a href="#" class="sign_see">新用户注册</a></li>
        </ul>
    </form>
</div>
<script type="text/javascript">
$(function(){
	var validator = $("#loginForm").validate({
			rules: {
				loginTel: {
					required: true,
					maxlength: 11,
					isMobile: true
				},
				loginPass: {
					required: true,
					minlength: 6
				}
			},
			messages: {
				loginTel: {
					required: "请输入手机号",
					maxlength: "请输入正确手机号",
					isMobile: "请输入正确手机号"
				},
				loginPass: {
					required: "请输入密码",
					minlength: '不能小于六位'
				}
			},
			submitHandler: function(form) {
				alert('通了')
			}
		});
})
</script>
</body>


</html>
